package com.coursehub.exercise.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.Min;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 练习创建数据传输对象
 */
@Data
public class ExerciseCreateDto {
    
    @NotBlank(message = "练习名称不能为空")
    @Size(max = 100, message = "练习名称长度不能超过100个字符")
    private String exerciseName;
    
    @NotNull(message = "练习截止时间不能为空")
    private LocalDateTime exerciseDeadline;
    
    @NotNull(message = "练习开始时间不能为空")
    private LocalDateTime exerciseStartTime;
    
    @NotBlank(message = "班级ID不能为空")
    @Size(max = 100, message = "班级ID长度不能超过100个字符")
    private String classesId;
    
    private Boolean isMultipleSubmission = false;
    
    @NotNull(message = "练习总分不能为空")
    @Min(value = 1, message = "练习总分必须大于0")
    private Integer exerciseScore;
}